home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / network / apple / MiscIPPB.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-05  |  4.5 KB  |  180 lines  |  [TEXT/R*ch]

  1. /*
  2.     File:        MiscIPPB.h
  3.  
  4.     Copyright:    © 1984-1993 by Apple Computer, Inc., all rights reserved.
  5.  
  6.     WARNING
  7.     This file was auto generated by the interfacer tool. Modifications
  8.     must be made to the master file.
  9.  
  10. */
  11.  
  12. #ifndef __MISCIPPB__
  13. #define __MISCIPPB__
  14.  
  15. #ifndef __MACTCPCOMMONTYPES__
  16. #include <MacTCPCommonTypes.h>
  17. #endif
  18.  
  19. #ifndef __APPLETALK__
  20. #include <AppleTalk.h>
  21. #endif
  22.  
  23. #define ipctlEchoICMP 17            /* send icmp echo */
  24. #define ipctlLAPStats 19            /* get lap stats */
  25.  
  26. #define IPParamBlockHeader         \
  27.     struct QElem *qLink;         \
  28.     short qType;                 \
  29.     short ioTrap;                 \
  30.     Ptr ioCmdAddr;                 \
  31.     ProcPtr ioCompletion;         \
  32.     OSErr ioResult;             \
  33.     StringPtr ioNamePtr;         \
  34.     short ioVRefNum;            \
  35.     short ioCRefNum;            \
  36.     short csCode
  37.  
  38. typedef void (*ICMPEchoNotifyProcPtr)(struct ICMPParamBlock *iopb);
  39.  
  40. enum {
  41.     uppICMPEchoNotifyProcInfo = kCStackBased
  42.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct ICMPParamBlock*)))
  43. };
  44.  
  45. #if USESROUTINEDESCRIPTORS
  46. typedef UniversalProcPtr ICMPEchoNotifyUPP;
  47.  
  48. #define CallICMPEchoNotifyProc(userRoutine, iopb)        \
  49.         CallUniversalProc((UniversalProcPtr)userRoutine, uppICMPEchoNotifyProcInfo, iopb)
  50. #define NewICMPEchoNotifyProc(userRoutine)        \
  51.         (ICMPEchoNotifyUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppICMPEchoNotifyProcInfo, GetCurrentISA())
  52. #else
  53. typedef ICMPEchoNotifyProcPtr ICMPEchoNotifyUPP;
  54.  
  55. #define CallICMPEchoNotifyProc(userRoutine, iopb)        \
  56.         (*userRoutine)(iopb)
  57. #define NewICMPEchoNotifyProc(userRoutine)        \
  58.         (ICMPEchoNotifyUPP)(userRoutine)
  59. #endif
  60.  
  61. typedef ICMPEchoNotifyProcPtr ICMPEchoNotifyProc;
  62.  
  63. #if defined(powerc) || defined (__powerc)
  64. #pragma options align=mac68k
  65. #endif
  66. struct IPParamBlock {
  67.     IPParamBlockHeader;                                /* standard I/O header */
  68.     union {
  69.         struct {
  70.             ip_addr                        dest;        /* echo to IP address */
  71.             wdsEntry                    data;
  72.             short                        timeout;
  73.             Ptr                            options;
  74.             unsigned short                optLength;
  75.             ICMPEchoNotifyProc            icmpCompletion;
  76.             unsigned long                userDataPtr;
  77.         } IPEchoPB;
  78.         struct {
  79.             struct LAPStats                *lapStatsPtr;
  80.         } LAPStatsPB;
  81.     } csParam;
  82. };
  83. #if defined(powerc) || defined(__powerc)
  84. #pragma options align=reset
  85. #endif
  86.  
  87. #if defined(powerc) || defined (__powerc)
  88. #pragma options align=mac68k
  89. #endif
  90. struct ICMPParamBlock {
  91.     IPParamBlockHeader;                                /* standard I/O header */
  92.     short                        params[11];
  93.     struct {
  94.         unsigned long            echoRequestOut;        /* time in ticks of when the echo request went out */
  95.         unsigned long            echoReplyIn;        /* time in ticks of when the reply was received */
  96.         struct rdsEntry            echoedData;            /* data received in responce */
  97.         Ptr                        options;
  98.         unsigned long            userDataPtr;
  99.     } icmpEchoInfo;
  100. };
  101. #if defined(powerc) || defined(__powerc)
  102. #pragma options align=reset
  103. #endif
  104.  
  105. #if defined(powerc) || defined (__powerc)
  106. #pragma options align=mac68k
  107. #endif
  108. struct LAPStats {
  109.     short                        ifType;
  110.     char                        *ifString;
  111.     short                        ifMaxMTU;
  112.     long                        ifSpeed;
  113.     short                        ifPhyAddrLength;
  114.     char                        *ifPhysicalAddress;
  115.     union {
  116.         struct arp_entry            *arp_table;
  117.         struct nbp_entry            *nbp_table;
  118.     } AddrXlation;
  119.     short                        slotNumber;
  120. };
  121. #if defined(powerc) || defined(__powerc)
  122. #pragma options align=reset
  123. #endif
  124.  
  125. typedef struct LAPStats LAPStats;
  126.  
  127. #define NBP_TABLE_SIZE 20
  128.  
  129. #define NBP_MAX_NAME_SIZE 16+10+2
  130.  
  131. #if defined(powerc) || defined (__powerc)
  132. #pragma options align=mac68k
  133. #endif
  134. struct nbp_entry {
  135.     ip_addr                        ip_address;        /* IP address */
  136.     AddrBlock                    at_address;        /* matching AppleTalk address */
  137.     Boolean                        gateway;        /* TRUE if entry for a gateway */
  138.     Boolean                        valid;            /* TRUE if LAP address is valid */
  139.     Boolean                        probing;        /* TRUE if NBP lookup pending */
  140.     long                        age;            /* ticks since cache entry verified */
  141.     long                        access;            /* ticks since last access */
  142.     char                        filler[116];    /* for internal use only !!! */
  143. };
  144. #if defined(powerc) || defined(__powerc)
  145. #pragma options align=reset
  146. #endif
  147.  
  148. #define ARP_TABLE_SIZE 20                        /* number of ARP table entries */
  149.  
  150. #if defined(powerc) || defined (__powerc)
  151. #pragma options align=mac68k
  152. #endif
  153. struct Enet_addr {
  154.     b_16                        en_hi;
  155.     b_32                        en_lo;
  156. };
  157. #if defined(powerc) || defined(__powerc)
  158. #pragma options align=reset
  159. #endif
  160.  
  161. typedef struct Enet_addr Enet_addr;
  162.  
  163. #if defined(powerc) || defined (__powerc)
  164. #pragma options align=mac68k
  165. #endif
  166. struct arp_entry {
  167.     short                        age;            /* cache aging field */
  168.     b_16                        protocol;        /* Protocol type */
  169.     ip_addr                        ip_address;        /* IP address */
  170.     Enet_addr                    en_address;        /* matching Ethernet address */
  171. };
  172. #if defined(powerc) || defined(__powerc)
  173. #pragma options align=reset
  174. #endif
  175.  
  176. typedef struct arp_entry arp_entry;
  177.  
  178. #endif
  179.  
  180.